<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %>

<html>
	<head>
		<title>Today's Comic Strips</title>
	</head>
	<body>
		<div>
			<sec:authentication property="principal.user.name" />
		
			<a href="/preferences.do">Preferences</a> 
			
			<a href="j_spring_security_logout">Log out</a>
		</div>
		
		<c:if test="${empty strips}">
			<p>So far you have no comic strips to see. Go ahead and add some in your preferences.</p>
		</c:if>
		
		<c:forEach var="strip" items="${strips}">
			<img src="${strip}" />
			<br />
		</c:forEach>
	</body>
</html>